Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR adds support for integration tools (server-side executed tools) in the copilot with an "Always Allow" feature and fixes hanging tool calls. The changes introduce:
Critical Issues Found:
Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ToolCallComponent as ToolCall Component
participant Store as Copilot Store
participant API as Backend API
participant Agent as Sim Agent
Note over User,Agent: Integration Tool Execution Flow (Allow)
User->>ToolCallComponent: Clicks "Allow" button
ToolCallComponent->>ToolCallComponent: setIsProcessing(true)
ToolCallComponent->>ToolCallComponent: setButtonsHidden(true)
ToolCallComponent->>ToolCallComponent: handleRun()
ToolCallComponent->>ToolCallComponent: Check isIntegrationTool()
ToolCallComponent->>Store: executeIntegrationTool(toolCallId)
Store->>Store: Update state to "executing"
Store->>API: POST /api/copilot/execute-tool
API->>Agent: Forward tool execution request
Agent-->>API: Return execution result
API-->>Store: Return success/failure
Store->>Store: Update state to "success" or "error"
Store-->>ToolCallComponent: Execution complete
ToolCallComponent->>ToolCallComponent: setIsProcessing(false)
Note over User,Agent: Integration Tool Skip Flow
User->>ToolCallComponent: Clicks "Skip" button
ToolCallComponent->>ToolCallComponent: handleSkip()
ToolCallComponent->>ToolCallComponent: Check isIntegrationTool()
ToolCallComponent->>Store: setToolCallState(rejected)
ToolCallComponent->>API: POST /api/copilot/tools/mark-complete
Note right of ToolCallComponent: Silent failure (empty catch)
API->>Agent: Notify tool was skipped
Agent-->>API: Acknowledge
Note over User,Agent: Always Allow Flow
User->>ToolCallComponent: Clicks "Always Allow"
ToolCallComponent->>ToolCallComponent: setIsProcessing(true)
ToolCallComponent->>ToolCallComponent: setButtonsHidden(true)
ToolCallComponent->>Store: addAutoAllowedTool(toolName)
Store->>API: POST /api/copilot/auto-allowed-tools
API->>Store: Tool added to allow list
ToolCallComponent->>Store: executeIntegrationTool(toolCallId)
Store->>API: POST /api/copilot/execute-tool
API->>Agent: Execute tool
Agent-->>Store: Result
Store-->>ToolCallComponent: Complete
|
...aceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx
Outdated
Show resolved
Hide resolved
...aceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx
Show resolved
Hide resolved
...aceId]/w/[workflowId]/components/panel/components/copilot/components/tool-call/tool-call.tsx
Show resolved
Hide resolved
* Fix copilot tool call flash * Fix lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(copilot): fix hanging tool calls (#2218)
fix(copilot): fix tool call flash (#2221)
fix(copilot): fix function execute tool (#2222)